//
//  DiyUITextField.m
//  iOS_NongLian
//
//  Created by n369 on 16/1/26.
//  Copyright © 2016年 NongLian. All rights reserved.
//

#import "DiyUITextField.h"

@implementation DiyUITextField

//用于子类继承时候重绘
- (CGRect)editingRectForBounds:(CGRect)bounds{
    CGRect inset = CGRectMake(bounds.origin.x + 30, bounds.origin.y, bounds.size.width - 26 * 2, bounds.size.height);
    return inset;
}

- (CGRect)placeholderRectForBounds:(CGRect)bounds{
    CGRect placeholder = CGRectMake(bounds.origin.x + 30, bounds.origin.y, bounds.size.width - 26, bounds.size.height);
    return placeholder;
}

- (CGRect)leftViewRectForBounds:(CGRect)bounds {
    CGRect leftView = CGRectMake(bounds.origin.x + 10, bounds.origin.y + 7, 16, 16);
    return leftView;
}

- (CGRect)rightViewRectForBounds:(CGRect)bounds {
    CGRect rightView = CGRectMake(bounds.origin.x + bounds.size.width - 26, bounds.origin.y + 7, 16, 16);
    return rightView;
}

@end
